﻿<html>
<head>
${inc:/action/pub/common}
<title>录入阄票</title>
</head>
<body onmouseup="hidInputValidatorTip(3);">
${inc:/action/pub/header}
<center>
<!--filter form-->
<div id="divFilter" style="display:none;width:100%">
</div>

<!--addnew/edit form-->
<div id="divEditor" style="display:inline;width:100%">
<form name="formEditor">
<TABLE class="table_comm" cellSpacing=0 cellPadding=0 width="100%" border=0>
<!-- 页面内容标签：如“新增记录”、“修改记录” -->
<tr>
<td>
<div id=tabs>
    <ul>
        <li onclick="changeLiStyle(this);" id="tabsl">
            <a  
                onmouseover="javascript:window.status='';return true;" 
                onmouseout="javascript:window.status='';return true;" 
                href='#' 
                onclick='JavaScript:return false;'>
                <span id="formTitleEditor">阄票录入</span>
            </a>
        </li>
    </ul>
    <div id='hline'></div>
</div>
</tr>
</td>
</table>

<FIELDSET><LEGEND>录入人员</LEGEND>
<TABLE class="table_comm" cellSpacing=0 cellPadding=0 width="100%" border=0>

			<input type="hidden" name="zhuajiu_tuid" id="zhuajiu_tuid" value="${fld:zhuajiu_tuid}">
			<input type="hidden" name="house_tuid" id="house_tuid" value="${fld:id}">
        <!--form fields-->
				<tr id="bind_tr">
            <td NOWRAP class="th20 required">
                姓名拼音快捷
            </td>
            <td class="td20left">
						<input type="text" name="master_chars" value="" onblur="javascript:findMaster()">
            </td>
        </tr>

        <tr id="bind_tr">
            <td NOWRAP class="th20 required">
                选择人员
            </td>
            <td class="td20left">
						<select name="master_tuid">
							<option value="">请选择人员</option>
							<rows>
								<option value="${fld:tuid}">${fld:master_name}</option>
							</rows>
						</select>
            </td>
        </tr>

</TABLE>
</FIELDSET>

<FIELDSET><LEGEND>操作信息</LEGEND>
<TABLE class=table_comm cellSpacing=0 cellPadding=0 width="100%" border=0>
        <col width="80%">
        <col width="20%">
        <!--buttons-->
        <tr>
            <td align="center" colspan=1>
                <input type="button" class="cmd" value="提交" onclick="return checkFields();">
                <input type="button" class="cmd" value="取消" onclick="window.close();" >
            </td>
            <td class="th20 required" colspan=3>
                特别标注为必填信息.
            </td>
        </tr>
    
</table>
</FIELDSET>
</form>
</div>

<!--insert/update response-->
<div id="divEditorResponse" style="display:none;width:100%">
</div>

<!--grid view response-->
<div id="response" style="display:none;width:100%">
</div>

<!--progress indicator-->
<!-- <br> -->
<div id="divStatus" class="alert" style="text-align:left; display:none;color:gray;width:150px;font-weight:bold;font-family:Arial">
	<img src="${def:context}/images/progress.gif"> 请稍候...
</div>

<!--show linked grid-->
<iframe id="detail" name="detail" marginwidth="0" scrolling="no" frameborder="0" style="height:0%;width:100%;visibility:hidden">
</iframe>

<!--用于传递当前目录到header模版中-->
<input type="hidden" name="actionroot" id="actionroot" value="${def:actionroot}">
</center>
</body>
</html>

<script language="javascript">
function checkFields(){
	if(document.forms["formEditor"].elements["master_tuid"].selectedIndex < 0){
			alert("请选择阄票");
			return false;
	}

	update(document.forms["formEditor"].elements["master_tuid"].value);
}

function update(id){
	if(id == "" || id == null){
		return false;
	}
	return ajaxCall(httpMethod="GET", 
                        uri=$("actionroot").value+"/updatejiupiao" + "?house_tuid=${fld:id}&zhuajiu_tuid=${fld:zhuajiu_tuid}&master_tuid="+id, 
                        divResponse="divEditorResponse", 
                        divProgress="divStatus", 
                        formName=null, 
                        afterResponseFn=null, 
                        onErrorFn=null);
}

function findMaster()
{
	return ajaxCall(httpMethod="GET", 
                        uri=$("actionroot").value+"/findmaster?house_tuid=${fld:id}&zhuajiu_tuid=${fld:zhuajiu_tuid}&master_chars="+document.forms["formEditor"].elements["master_chars"].value, 
                        divResponse="divEditorResponse", 
                        divProgress="divStatus", 
                        formName=null, 
                        afterResponseFn=null, 
                        onErrorFn=null);
}

</script>